import request from '../utils/request.js'
// 获取商品类型
export function getShopClassList(){
    return request({
        url:'api/v1/xcx/shopCategories',
        method:'GET'
    })
}
// 买过的商品列表
export function getsaleShopList(){
    return request({
        url:'api/v1/xcx/getPayShopGoodsList',
        method:'GET'
    })
}
// 收藏列表
export function shopGoodCollects(){
    return request({
        url:'api/v1/xcx/shopGoodCollects',
        method:'POST'
    })
}
// 活动商品列表
export function getactivityShopList(data){
    return request({
        url:'api/v1/xcx/getActsGoodsList',
        data: data,
        method:'GET'
    })
}
// 活动
export function getAct(){
    return request({
        url:'api/v1/xcx/getActs',
        method:'GET'
    })
}
// 抢购列表
export function aggoodsList(){
    return request({
        url:'api/v1/activity/goodsList',
        method:'GET'
    })
}
// 抢购
export function doSeckill(data){
    return request({
        url:'api/v1/activity/doSeckill',
        data:data,
        method:'POST'
    })
}
// 抢购商品列表
export function goodsListInfo(data){
    return request({
        url:'api/v1/activity/goodsListInfo',
        data:data,
        method:'GET'
    })
}
// 获取二级商品菜单
export function gettwoShopList(id){
    return request({
        url:'api/v1/xcx/getShopCategoryList',
        data: {pid:id},
        method:'GET'
    })
}
// 获取乡镇
export function getTownList(data){
    return request({
        url:'api/v1/xcx/getTownList',
        data: data,
        method:'GET'
    })
}
// 获取二级商品列表
export function getShopGoodsList(data){
    return request({
        url:'api/v1/xcx/getShopGoodsList',
        data: data,
        method:'GET'
    })
}
// 获取商品详情 pc级接口
export function houseGoodsInfo(data){
    return request({
        url:'api/v1/adminWare/houseGoodsInfo',
        data: data,
        method:'GET'
    })
}

// 获取充值明细
export function rechargeList(data){
    return request({
        url:'api/v1/userCenter/rechargeList',
        data: data,
        method:'GET'
    })
}
// 获取签到列表
export function signList(data){
    return request({
        url:'api/v1/sign/index',
        data: data,
        method:'GET'
    })
}
// 获取秒杀信息
export function goodsListNew(data){
    return request({
        url:'api/v1/activity/goodsListNew',
        data: data,
        method:'GET'
    })
}
// 查询默认地址
export function receiveDefault(data){
    return request({
        url:'api/v1/activity/receiveDefault',
        data: data,
        method:'GET'
    })
}
// 签到
export function doSign(data){
    return request({
        url:'api/v1/sign/doSign',
        data: data,
        method:'POST'
    })
}
// 上传头像
export function uploadImages(data){
    return request({
        url:'api/v1/image/uploadImages',
        data: data,
        method:'POST'
    })
}
// 更新头像
export function userCenter(data){
    return request({
        url:'api/v1/userCenter/updateHeadImage',
        data: data,
        method:'POST'
    })
}
// 购物车选中状态
export function updacartChecked(data){
    return request({
        url:'api/v1/xcx/cartChecked',
        data: data,
        method:'POST'
    })
}
// 获取消费明细
export function consumerList(data){
    return request({
        url:'api/v1/userCenter/consumerList',
        data: data,
        method:'GET'
    })
}
// 获取首页轮播图
export function bannerList(data){
    return request({
        url:'api/v1/xcx/bannerList',
        data: data,
        method:'GET'
    })
}


// 卡包列表
export function rewardLogs(data){
    return request({
        url:'api/v1/sign/rewardLogs',
        data: data,
        method:'GET'
    })
}
//
export function rechargeShow(data){
    return request({
        url:'api/v1/xcx/rechargeShow',
        data: data,
        method:'GET'
    })
}
//
export function platform(data){
    return request({
        url:'api/v1/platform/list',
        data: data,
        method:'GET'
    })
}
//
export function platform2(data){
    return request({
        url:'api/v1/platform/list2',
        data: data,
        method:'GET'
    })
}
// 购物车列表
export function shoppingCartList(data){
    return request({
        url:'api/v1/xcx/shoppingCartList',
        data: data,
        method:'GET'
    })
}
// 获取购物车数量
export function getShopCartCount(data){
    return request({
        url:'api/v1/xcx/getShopCartCount',
        data: data,
        method:'GET'
    })
}
// 获取banner
export function adPositions(data){
    return request({
        url:'api/v1/xcx/adPositions',
        data: data,
        method:'GET'
    })
}

// 商品详情
export function getShopGoodsInfo(data){
    return request({
        url:'api/v1/xcx/getShopGoodsInfo',
        data: data,
        method:'GET'
    })
}

// 购物卡列表
export function gwkList(data){
    return request({
        url:'api/v1/xcx/gwkList',
        data: data,
        method:'GET'
    })
}
// 核销二维码
export function rewardHeXiao(data){
    return request({
        url:'api/v1/xcx/rewardHeXiao',
        data: data,
        method:'GET'
    })
}
// 查询核销状态
export function getRewardLogDetail(data){
    return request({
        url:'api/v1/xcx/getRewardLogDetail',
        data: data,
        method:'GET'
    })
}

// 添加购物车
export function addShoppingCart(data){
    return request({
        url:'api/v1/xcx/addShoppingCart',
        data: data,
        method:'POST'
    })
}
// 取消订单
export function doRefund(data){
    return request({
        url:'api/v1/xcx/doRefund',
        data: data,
        method:'POST'
    })
}
// 批量删除购物车
export function delShopCart(data){
    return request({
        url:'api/v1/xcx/delShopCart',
        data: data,
        method:'POST'
    })
}
// 收藏商品
export function collectShopGood(data){
    return request({
        url:'api/v1/xcx/collectShopGood',
        data: data,
        method:'POST'
    })
}







//地区
export function getRegionByPid(data){
    return request({
        url:'api/v1/sysRegion/getRegionByPid',
        method:'GET',
        data
    })
}
//地区详情
export function gfReceiveInfo(data){
    return request({
        url:'api/v1/gfReceive/info',
        method:'GET',
        data
    })
}
//删除地址
export function delReceive(data){
    return request({
        url:'api/v1/gfReceive/del',
        method:'POST',
        data
    })
}
// 添加地址
export function gfReceivesave(data){
    return request({
        url:'api/v1/gfReceive/save',
        data: data,
        method:'POST'
    })
}
// 地址列表
export function gfReceiveindex(data){
    return request({
        url:'api/v1/gfReceive/index',
        data: data,
        method:'GET'
    })
}
// 取消订单
export function cancelOrder(data){
    return request({
        url:'api/v1/xcx/cancelOrder',
        data: data,
        method:'POST'
    })
}
// 修改购物车商品数量
export function addCartAmount(data){
    return request({
        url:'api/v1/xcx/addCartAmount',
        data: data,
        method:'POST'
    })
}

//下单
export function createYzOrder(data){
    return request({
        url:'api/v1/xcx/createOrder ',
        method:'POST',
        data
    })
}
//支付
export function miniPay(data){
    return request({
        url:'api/v1/wechat/miniPay',
        method:'POST',
        data
    })
}
//微信充值
export function recharge(data){
    return request({
        url:'api/v1/wechat/recharge',
        method:'POST',
        data
    })
}
// 正元充值
export function stRechargeZy(data){
    return request({
        url:'api/v1/st/stRechargeZy',
        data: data,
        method:'POST'
    })
}
// 公安充值
export function swagger(data){
    return request({
        url:'api/v1/ga/pay',
        data: data,
        method:'POST'
    })
}
//金平湖充值
export function stRechargeJph(data){
    return request({
        url:'api/v1/st/stRechargeJph',
        method:'POST',
        data
    })
}
//云点优味充值
export function stRechargeReq(data){
    return request({
        url:'api/v1/st/stRechargeReq',
        method:'POST',
        data
    })
}
//和美云充值
export function stRechargeHmy(data){
    return request({
        url:'api/v1/st/stRechargeHmy',
        method:'POST',
        data
    })
}
// 优惠价格
export function settlementDetail(data){
    return request({
        url:'api/v1/xcx/settlementDetail',
        data: data,
        method:'POST'
    })
}
// 优惠券列表
export function chooseCoupon(data){
    return request({
        url:'api/v1/xcx/chooseCoupon',
        data: data,
        method:'GET'
    })
}
// 获取商品评价详情
export function getGoodsReviews(data){
    return request({
        url:'api/v1/reviews/getGoodsReviews',
        data: data,
        method:'GET'
    })
}
// 获取商品好评率
export function getReviewsCount(data){
    return request({
        url:'api/v1/reviews/getReviewsCount',
        data: data,
        method:'GET'
    })
}
// 获取订单评价列表
export function getReviewableItems(data){
    return request({
        url:'api/v1/reviews/getReviewableItems',
        data: data,
        method:'GET'
    })
}
// 金平湖食堂租户列表
export function jphStStoreList(data){
    return request({
        url:'api/v1/st/jphStStoreList',
        data: data,
        method:'GET'
    })
}
// 站点列表
export function getShopStoreList(data){
    return request({
        url:'api/v1/xcx/getShopStoreList',
        data: data,
        method:'GET'
    })
}
// 减少购物车某个商品的数量
export function delCart(data){
    return request({
        url:'api/v1/xcx/delCart',
        data: data,
        method:'POST'
    })
}
// 商品评价
export function Appstore(data){
    return request({
        url:'api/v1/reviews/store',
        data: data,
        method:'POST'
    })
}
// 一键好评
export function allGood(data){
    return request({
        url:'api/v1/reviews/allGood',
        data: data,
        method:'POST'
    })
}
// 确认收货
export function updateOrder(data){
    return request({
        url:'api/v1/xcx/updateOrder',
        data: data,
        method:'POST'
    })
}

// 订单列表2
export function shopOrderList(data){
    return request({
        url:'api/v1/xcx/shopOrderList2',
        data: data,
        method:'GET'
    })
}
// 订单列表1
export function shopOrderList_old(data){
    return request({
        url:'api/v1/xcx/shopOrderList',
        data: data,
        method:'GET'
    })
}
// 订单详情
export function orderDetail(data){
    return request({
        url:'api/v1/xcx/orderDetail',
        data: data,
        method:'GET'
    })
}

// export function login(data){
//     return request({
//         url:'api/v1/weapp/authorizations',
//         data:data,
//         method:'POST'
//     })
// }
